import request from '@/utils/request'

export function getMenuByRoleId(params) {
  return request({
    url: '/admin/api/authority/getMenuByRoleId',
    method: 'get',
    params,
  })
}

export function setAuthorityAdd(data) {
  return request({
    url: '/admin/api/authority/add  ',
    method: 'post',
    data,
  })
}


export function getRouterList() {
  return request({
    url: '/admin/api/menu/find-all-menu',
    method: 'get',
  })
}


export function doAdd(data) {
  return request({
    url: '/admin/api/menu/add',
    method: 'post',
    data,
  })
}

export function doEdit(data) {
  return request({
    url: '/admin/api/menu/upd',
    method: 'put',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: '/admin/api/menu/del',
    method: 'DELETE',
    data,
  })
}